﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using BitworkStudios.ClockNet.Core;
using BitworkStudios.ClockNet.Core.Contracts;

namespace BitworkStudios.ClockNet.Web.Controllers
{
    public class TimeKeeperController : ApiController
    {
        private readonly ITimeKeeperService _timeKeeperService;

        public TimeKeeperController(ITimeKeeperService timeKeeperService)
        {
            _timeKeeperService = timeKeeperService;
        }

        public IHttpActionResult GetCurrentTime()
        {
            return Ok(_timeKeeperService.GetCurrentDecimalTime());
        }
    }
}
